extends PanelContainer


var item_in_grid = ""
var amount_in_grid = 0

@export var grid_index: int = 0

func _ready():
	mouse_filter = Control.MOUSE_FILTER_PASS
	gui_input.connect(_on_gui_input)
	
func _process(delta: float) -> void:
	if GameUtiles.current_grid == name:
		modulate = Color(0.498, 0.376, 0.188, 0.392)
	else:
		modulate = Color(1,1,1)



func _on_gui_input(event) -> void:
	if event is InputEventMouseButton:
		if event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
			SeManager.play_select()
			GameUtiles.current_grid=name
			GameUtiles.current_item=item_in_grid
			
